package com.shy.example.service.consumer.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Service
@FeignClient(value = "service-hystrix", fallback = DeptHystrixFallbackService.class)
public interface DeptHystrixService {

    @GetMapping("dept/hystrix/ok/{id}")
    String deptInfo_Ok(@PathVariable("id") Integer id);

    @GetMapping("dept/hystrix/timeout/{id}")
    String deptInfo_Timeout(@PathVariable("id") Integer id);
}
